package com.qf.utils.caiwu.handler;


import com.qf.utils.caiwu.exception.PoorException;
import com.qf.utils.caiwu.vo.ResultVO;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 异常处理器
 */
@RestControllerAdvice
public class PoorExceptionHandler {
    @ExceptionHandler({PoorException.class})
    public ResultVO poorException(PoorException e){
        return new ResultVO(e.getCode(), e.getMessage(), null);
    }
}
